package com.shop.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shop.entity.dto.AdminWares.AdminWaresListDto;
import com.shop.entity.pojo.Wares;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WaresMapper extends BaseMapper<Wares> {

    int saveWares(@Param("wares") Wares wares);

    Page<Wares> getAllByPage(@Param("page")Page<Wares> page, @Param("dto")AdminWaresListDto dto);

    List<Wares> getList(@Param("wares")Wares wares);

    Wares getOne(@Param("id") Long id);

    boolean updateDelete(@Param("wares")Wares wares);

    boolean delById(@Param("id")Long id);

}




